package server;

import java.util.*;

public class GereLeiloes {
	
	Global g;
	
	public GereLeiloes() {
		//g.leiloes = new Vector();
		g = new Global();
	}
	
	public Vector getLeiloesActuais() {
		Vector leiloesActuais = new Vector();
		
    	Enumeration enu = g.leiloes.elements();
        for(int i=0 ; enu.hasMoreElements();i++){
             Leilao l = (Leilao) enu.nextElement();
             if(!l.getProduto().isSold())
            	 leiloesActuais.add(l);
        }
		
		return leiloesActuais;
	}

}
